<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
<div class="ibox-content">
    <form action="" class="form-inline" id="form1">
        <table class="table-bordered table row-margin-top top_table">
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">活动编号</label></td>
                <td><input type="text" class="form-control" name="sn" value="{$sn}"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">活动主题</label></td>
                <td><input type="text" class="form-control" name="title" value="{$title}"></td>
                <td style="min-width: 120px;width: 120px" colspan="2"></td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn btn-info query">查询</button>
                    <button class="btn btn-info emptyIf" type="button">清空查询条件</button>
                </td>
            </tr>
        </table>
    </form>
    <div class="row wrapper white-bg "
         style="position: relative;margin:0;height: 100px;border-bottom:3px solid #1090d0">
        <h2 class="text-center font-bold padding-10" style="font-size: 16px">{$jxs['title']}
            <span style="position: absolute;top:10px; right:100px">
                <a href="javascript:;" class="btn btn-success btn-outline" rol="button" id="export">导出对账单</a>
                <a href="{:url('duizhangdan',['id'=>request()->param('id')])}" class="btn btn-primary btn-outline"
                   rol="button" style="margin-left: 10px">查看汇总对账单</a>
            </span>
        </h2>
        <p style="text-align: center;">截止至{:date('Y')}年{:date('m')}月{:date('d')}日&nbsp;经销商垫付费用对账单-非常规和进场</p>
    </div>
    <div class="col-md-12 white-bg" style="padding-top: 20px">
        <p>
            <span class="AgencyName font-bold" style="font-size: 16px;">{$jxs['title']}</span>
            <span>(编号：<span class="AgencyNum">{$jxs.sn}</span>)</span>
        </p>
        <p>营业地址：
            <span class="AgencyAddress">{$jxs.addr}</span>
            <span style="padding:0 40px">联系人：{$jxs.contact1}</span>
            联系电话：<span class="AgencyTel">{$jxs.mobile1}</span>
        </p>
        <p style="text-align: right;">下述金额为含税金额：人民币元</p>
    </div>
    <table class="table table-striped table-bordered tableActivity">
        <tr class="info">
            <th class="text-center" rowspan="2">活动编号</th>
            <th class="text-center" rowspan="2">活动主题</th>
            <th class="text-center" rowspan="2">已批准</th>
            <th class="text-center" rowspan="2">已核销</th>
            <th class="text-center" colspan="2">未核销</th>
            <th class="text-center" rowspan="2">不予核销</th>
            <th class="text-center" rowspan="2">已支付</th>
            <th class="text-center" rowspan="2">待支付</th>
        </tr>
        <tr class="info">
            <th class="text-center">申请中</th>
            <th class="text-center">未申请</th>
        </tr>
        {volist name="mx" id="row"}
        <tr class="text-right">
            <td>{$row.sn}</td>
            <td>{$row.title}</td>
            <td class="ObjectNum">{$row.ypz}</td>
            <td class="ObjectNum">{$row.yhx}</td>
            <td class="ObjectNum">{$row.sqz}</td>
            <td class="ObjectNum">{$row.wsq}</td>
            <td class="ObjectNum">{$row.byhx}</td>
            <td class="ObjectNum">{$row.yzf}</td>
            <td class="ObjectNum">{$row.dzf}</td>
        </tr>
        {/volist}
        <tr class="trTotal text-right">
            <td colspan="2" class="text-right">总计</td>
            <td class="ObjectNum">{$ypz}</td>
            <td class="ObjectNum">{$yhx}</td>
            <td class="ObjectNum">{$sqz}</td>
            <td class="ObjectNum">{$wsq}</td>
            <td class="ObjectNum">{$byhx}</td>
            <td class="ObjectNum">{$yzf}</td>
            <td class="ObjectNum">{$dzf}</td>
        </tr>
    </table>
    <div class="col-md-12 white-bg" style="padding-left: 20px">
        <h4>补充</h4>
        <p>经销商必须在拿到申请后才可以作费用垫付核销。广州销路通软件有限公司将不知福没有申请号的费用核销。</p>
        <p>因为活动可能存在变动或取消，请经销商以最新的对账信息为准，恕不另行通知</p>
        <p>如对以上对账单有任何疑问，请尽快与我方联系确认。</p>
        <p>本对账单最终解释权归本公司所有。</p>
    </div>
    <div class="clearfix row-margin-top">
        <div class="col-md-12 text-center" style="width: 400px;float: right;">
            <span class="font-bold" style="font-size:18px;">广州销路通软件有限公司</span><br>
            <span class="margin-10">{:date('Y年m月d日')}</span>
        </div>
    </div>

</div>

<!-- 全局js -->
{include file="Public/footer"}
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!--统计代码，可删除-->
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/common.js"></script>
<script>
    $(document).ready(function () {
        var $ObjectNum = $(".ObjectNum");
        toNum($ObjectNum);
        $('.emptyIf').on('click',function () {
            var form = $(this).closest('form')
            form.find('input[type=text]').each(function (i,o) {
                $(o).val('')
            })
            form.submit()
        })
        //export
        $('#export').on('click',function () {
            var param = $('#form1').serialize();
            window.open('{:url("export2",["id"=>request()->param("id")])}?'+param)
        })
    })
</script>
</body>

</html>
